package com.aspose.cells.a.c;

import java.lang.reflect.Array;
import java.util.Arrays;

public class zc {
   public static boolean a(Object var0) {
      return var0 == null ? false : var0.getClass().isArray();
   }

   public static int a(Object var0, int var1) {
      return var1 == 0 ? Array.getLength(var0) : a(Array.get(var0, 0), var1 - 1);
   }

   public static int a(Object[][] var0, int var1) {
      if (var1 == 0) {
         return var0.length - 1;
      } else if (var1 == 1) {
         return var0[0].length - 1;
      } else {
         throw new IllegalArgumentException("Dimension must be 0 or 1 ");
      }
   }

   public static int a(int[][] var0, int var1) {
      if (var1 == 0) {
         return var0.length - 1;
      } else if (var1 == 1) {
         return var0[0].length - 1;
      } else {
         throw new IllegalArgumentException("Dimension must be 0 or 1 ");
      }
   }

   public static int a(double[][] var0, int var1) {
      if (var1 == 0) {
         return var0.length - 1;
      } else if (var1 == 1) {
         return var0[0].length - 1;
      } else {
         throw new IllegalArgumentException("Dimension must be 0 or 1 ");
      }
   }

   public static double[] a(Object[] var0) {
      if (var0 == null) {
         return null;
      } else {
         double[] var1 = new double[var0.length];

         for(int var2 = 0; var2 < var0.length; ++var2) {
            var1[var2] = (Double)var0[var2];
         }

         return var1;
      }
   }

   public static double[] b(Object var0) {
      return a((Object[])((Object[])var0));
   }

   public static Object[] c(Object var0) {
      if (var0 == null) {
         return null;
      } else {
         Object[] var1 = null;
         int var3;
         if (var0 instanceof double[]) {
            double[] var2 = (double[])((double[])var0);
            var1 = new Object[var2.length];

            for(var3 = 0; var3 < var1.length; ++var3) {
               var1[var3] = var2[var3];
            }
         } else if (var0 instanceof int[]) {
            int[] var4 = (int[])((int[])var0);
            var1 = new Object[var4.length];

            for(var3 = 0; var3 < var1.length; ++var3) {
               var1[var3] = var4[var3];
            }
         } else if (var0 instanceof short[]) {
            short[] var5 = (short[])((short[])var0);
            var1 = new Object[var5.length];

            for(var3 = 0; var3 < var1.length; ++var3) {
               var1[var3] = var5[var3];
            }
         } else if (var0 instanceof long[]) {
            long[] var6 = (long[])((long[])var0);
            var1 = new Object[var6.length];

            for(var3 = 0; var3 < var1.length; ++var3) {
               var1[var3] = var6[var3];
            }
         } else if (var0 instanceof byte[]) {
            byte[] var7 = (byte[])((byte[])var0);
            var1 = new Object[var7.length];

            for(var3 = 0; var3 < var1.length; ++var3) {
               var1[var3] = var7[var3];
            }
         } else if (var0 instanceof boolean[]) {
            boolean[] var8 = (boolean[])((boolean[])var0);
            var1 = new Object[var8.length];

            for(var3 = 0; var3 < var1.length; ++var3) {
               var1[var3] = var8[var3];
            }
         } else if (var0 instanceof char[]) {
            char[] var9 = (char[])((char[])var0);
            var1 = new Object[var9.length];

            for(var3 = 0; var3 < var1.length; ++var3) {
               var1[var3] = var9[var3];
            }
         } else {
            var1 = (Object[])((Object[])var0);
         }

         return var1;
      }
   }

   public static void a(byte[] var0, int var1, int var2, byte var3) {
      Arrays.fill(var0, var1, var2, var3);
   }

   public static void a(char[] var0, int var1, int var2, char var3) {
      Arrays.fill(var0, var1, var2, var3);
   }

   public static void a(int[] var0, int var1, int var2, int var3) {
      Arrays.fill(var0, var1, var2, var3);
   }

   public static void a(double[] var0, int var1, int var2, double var3) {
      Arrays.fill(var0, var1, var2, var3);
   }

   public static void a(boolean[] var0, int var1, int var2, boolean var3) {
      Arrays.fill(var0, var1, var2, var3);
   }

   public static void a(Object[] var0, int var1, int var2, Object var3) {
      Arrays.fill(var0, var1, var2, var3);
   }
}
